package com.atguigu.structure.composite;

public class College extends EduComponent{
    public College(String name) {
        super(name);
    }

    @Override
    protected void add(EduComponent component) {
        children.add(component);
    }

    @Override
    protected void remove(EduComponent component) {
        children.remove(component);
    }

    @Override
    protected void print() {
        System.out.println("--"+name);
        for (EduComponent child : children) {
            child.print();
        }
    }
}
